Message Transmission Optimization Mechanism

MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from Web services.

MTOM is usually used with XOP (XML-binary Optimized Packaging).

Contents

Status

MTOM is a W3C Recommendation.

In the lead up to the approval of MTOM as a W3C Recommendation, several different alternatives for handling binary data in SOAP messages were submitted to the W3C: SOAP with Attachments (SwA) and DIME attachments. MTOM supersedes those other proposals.

Benefits

The efficiency claims of MTOM only refers to the size of the messages sent across the wire. Since SOAP uses XML, any binary data in the SOAP message will have to be encoded as text. This is usually done using Base64 encoding which increases the size of the binary data by 33%. MTOM provides a way to send the binary data in its original binary form, avoiding any increase in size due to encoding it in text. MTOM does not address the efficiency of serializing or deserializing the messages.

Application

MTOM only optimizes element content that is in the canonical lexical representation of the xs:base64Binary data type. Since there is no standard way to indicate whether data is in the canonical lexical representation, the mechanism for applying MTOM is implementation dependent.

The use of MTOM is a hop-by-hop contract between one SOAP node and the next. There is no guarantee that the optimization will be preserved if there are multiple SOAP nodes involved.

Details

Although most users treat MTOM as a single mechanism, the MTOM specification defines it as three related features:

Sometimes the term "MTOM" is used as a shorthand to mean "MTOM with XOP". XOP is used as the referencing mechanism in the serialised XML infoset. In theory, the abstract MTOM model could be used with a different referencing mechanism or different container format. In theory, MTOM could be used over a different transport protocol instead of HTTP. In practice, MTOM is usually used with XOP, MIME and HTTP.

See also

External links